{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# pandas"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 引入约定"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "ImportError",
     "evalue": "cannot import name 'nosetester'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mImportError\u001b[0m                               Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-c046f915005f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[1;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mD:\\Program Files\\Anaconda3\\lib\\site-packages\\pandas\\__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     54\u001b[0m \u001b[1;31m# define the testing framework\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m     55\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtesting\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m---> 56\u001b[0;31m \u001b[1;32mfrom\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnosetester\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mNoseTester\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     57\u001b[0m \u001b[0mtest\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mNoseTester\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtest\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m     58\u001b[0m \u001b[1;32mdel\u001b[0m \u001b[0mNoseTester\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mD:\\Program Files\\Anaconda3\\lib\\site-packages\\pandas\\util\\nosetester.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     11\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mwarnings\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m     12\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcompat\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mstring_types\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[1;32mfrom\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtesting\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mnosetester\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     14\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m     15\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mImportError\u001b[0m: cannot import name 'nosetester'"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from pandas import DataFrame,Series  # 数据框、一维数组"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Series   一维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "arr=np.arange(20)   #建立一个数组\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 885,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "series=Series(arr)  #一个一维数组对象"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 886,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      0\n",
       "1      1\n",
       "2      2\n",
       "3      3\n",
       "4      4\n",
       "5      5\n",
       "6      6\n",
       "7      7\n",
       "8      8\n",
       "9      9\n",
       "10    10\n",
       "11    11\n",
       "12    12\n",
       "13    13\n",
       "14    14\n",
       "15    15\n",
       "16    16\n",
       "17    17\n",
       "18    18\n",
       "19    19\n",
       "dtype: int32"
      ]
     },
     "execution_count": 886,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 查看索引列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 887,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=20, step=1)"
      ]
     },
     "execution_count": 887,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series.index"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据index绑定"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 888,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "series1=Series([70,89,67],index=['张三','李四','王屋']) #index实现索引的绑定"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 889,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "张三    70\n",
       "李四    89\n",
       "王屋    67\n",
       "dtype: int64"
      ]
     },
     "execution_count": 889,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 890,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([70, 89, 67], dtype=int64)"
      ]
     },
     "execution_count": 890,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series1.values #查看数据列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 891,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['张三', '李四', '王屋'], dtype='object')"
      ]
     },
     "execution_count": 891,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series1.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 892,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('int64')"
      ]
     },
     "execution_count": 892,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series1.dtype #查看数据类型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 缺失值的检测"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* isnull"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 893,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "Series2=Series([1,2,3,4,np.NaN,5,6,8,9])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 894,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    2.0\n",
       "2    3.0\n",
       "3    4.0\n",
       "4    NaN\n",
       "5    5.0\n",
       "6    6.0\n",
       "7    8.0\n",
       "8    9.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 894,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Series2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 895,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    False\n",
       "1    False\n",
       "2    False\n",
       "3    False\n",
       "4     True\n",
       "5    False\n",
       "6    False\n",
       "7    False\n",
       "8    False\n",
       "dtype: bool"
      ]
     },
     "execution_count": 895,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Series2.isnull()   # 为空的元素，返回True"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* notnull"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 896,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     True\n",
       "1     True\n",
       "2     True\n",
       "3     True\n",
       "4    False\n",
       "5     True\n",
       "6     True\n",
       "7     True\n",
       "8     True\n",
       "dtype: bool"
      ]
     },
     "execution_count": 896,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Series2.notnull() # 不为空的元素，返回True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 897,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s1=Series([1,2,3,4,5],index=['a','b','c','d','e'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 898,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "s2=Series([1,2,3,4,5],index=['b','a','e','c','d'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 899,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    1\n",
       "b    2\n",
       "c    3\n",
       "d    4\n",
       "e    5\n",
       "dtype: int64"
      ]
     },
     "execution_count": 899,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 900,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "b    1\n",
       "a    2\n",
       "e    3\n",
       "c    4\n",
       "d    5\n",
       "dtype: int64"
      ]
     },
     "execution_count": 900,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 901,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a     2\n",
       "b     2\n",
       "c    12\n",
       "d    20\n",
       "e    15\n",
       "dtype: int64"
      ]
     },
     "execution_count": 901,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Series最重要的一个功能是：\n",
    "# 它在算术运算中会自动对齐不同索引的数据。\n",
    "s1*s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 902,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a     2\n",
       "b     2\n",
       "c    12\n",
       "d    20\n",
       "e    15\n",
       "dtype: int64"
      ]
     },
     "execution_count": 902,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2*s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 903,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df=DataFrame([[1,2,3],[3,4,5]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 904,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "0  1  2  3\n",
       "1  3  4  5"
      ]
     },
     "execution_count": 904,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 905,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df=DataFrame([[1,2,3],[3,4,5]],index=[['a','b']])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 906,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "a  1  2  3\n",
       "b  3  4  5"
      ]
     },
     "execution_count": 906,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 907,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 907,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[1]['a']#取出第2列，第'a'行的数据，从列开始取值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 908,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "b  3  4  5"
      ]
     },
     "execution_count": 908,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[1:]     # 如果使用切片，那么从行开始取值"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 909,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s1=DataFrame({'python':(10,20,30),'C++':Series([50,50,20]),'JAVA':Series([20,30,40])})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 910,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>C++</th>\n",
       "      <th>JAVA</th>\n",
       "      <th>python</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>50</td>\n",
       "      <td>20</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50</td>\n",
       "      <td>30</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>40</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   C++  JAVA  python\n",
       "0   50    20      10\n",
       "1   50    30      20\n",
       "2   20    40      30"
      ]
     },
     "execution_count": 910,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 911,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>C++</th>\n",
       "      <th>JAVA</th>\n",
       "      <th>python</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50</td>\n",
       "      <td>30</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>40</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   C++  JAVA  python\n",
       "1   50    30      20\n",
       "2   20    40      30"
      ]
     },
     "execution_count": 911,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1[1:]  # 缩减写法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 912,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>C++</th>\n",
       "      <th>JAVA</th>\n",
       "      <th>python</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>40</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   C++  JAVA  python\n",
       "2   20    40      30"
      ]
     },
     "execution_count": 912,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1.ix[2:] #完整使用ix的写法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 913,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "50"
      ]
     },
     "execution_count": 913,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1['C++'][1]    # 此时括号内的所有的内容，都代表的是索引名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 914,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "C++       50\n",
       "JAVA      20\n",
       "python    10\n",
       "Name: 0, dtype: int64"
      ]
     },
     "execution_count": 914,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1.ix[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 915,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s1.index=[2,3,4]\n",
    "s1.columns=['Java', 'c', 'Vb']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 916,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Java</th>\n",
       "      <th>c</th>\n",
       "      <th>Vb</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>50</td>\n",
       "      <td>20</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>50</td>\n",
       "      <td>30</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20</td>\n",
       "      <td>40</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Java   c  Vb\n",
       "2    50  20  10\n",
       "3    50  30  20\n",
       "4    20  40  30"
      ]
     },
     "execution_count": 916,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 917,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.2602578 , 0.6976972 ],\n",
       "       [0.92575376, 0.505685  ],\n",
       "       [0.21211325, 0.75225992],\n",
       "       [0.83330568, 0.02218976]])"
      ]
     },
     "execution_count": 917,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "n1=np.random.random((4, 2))\n",
    "# n1=np.random.random((20, 2))\n",
    "# help(np.random.random)\n",
    "n1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 918,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1\n",
       "0  0.260258  0.697697\n",
       "1  0.925754  0.505685\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 918,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2=DataFrame(n1)\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 919,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1\n",
       "0  0.260258  0.697697\n",
       "1  0.925754  0.505685\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 919,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.head()   # 默认为前5行数据，可以自定义显示行数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 920,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1\n",
       "0  0.260258  0.697697\n",
       "1  0.925754  0.505685\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 920,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.tail()   # 默认为后5行数据，可以自定义显示行数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 921,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>0.557858</td>\n",
       "      <td>0.494458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.373865</td>\n",
       "      <td>0.332130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>0.248222</td>\n",
       "      <td>0.384811</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>0.546782</td>\n",
       "      <td>0.601691</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.856418</td>\n",
       "      <td>0.711338</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              0         1\n",
       "count  4.000000  4.000000\n",
       "mean   0.557858  0.494458\n",
       "std    0.373865  0.332130\n",
       "min    0.212113  0.022190\n",
       "25%    0.248222  0.384811\n",
       "50%    0.546782  0.601691\n",
       "75%    0.856418  0.711338\n",
       "max    0.925754  0.752260"
      ]
     },
     "execution_count": 921,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.describe()  #快速统计汇总"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 922,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 4 entries, 0 to 3\n",
      "Data columns (total 2 columns):\n",
      "0    4 non-null float64\n",
      "1    4 non-null float64\n",
      "dtypes: float64(2)\n",
      "memory usage: 144.0 bytes\n"
     ]
    }
   ],
   "source": [
    "s2.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 923,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.833306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.697697</td>\n",
       "      <td>0.505685</td>\n",
       "      <td>0.752260</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1         2         3\n",
       "0  0.260258  0.925754  0.212113  0.833306\n",
       "1  0.697697  0.505685  0.752260  0.022190"
      ]
     },
     "execution_count": 923,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 924,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>0.478978</td>\n",
       "      <td>0.715719</td>\n",
       "      <td>0.482187</td>\n",
       "      <td>0.427748</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.309316</td>\n",
       "      <td>0.297033</td>\n",
       "      <td>0.381941</td>\n",
       "      <td>0.573546</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.505685</td>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>0.369618</td>\n",
       "      <td>0.610702</td>\n",
       "      <td>0.347150</td>\n",
       "      <td>0.224969</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>0.478978</td>\n",
       "      <td>0.715719</td>\n",
       "      <td>0.482187</td>\n",
       "      <td>0.427748</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.588337</td>\n",
       "      <td>0.820737</td>\n",
       "      <td>0.617223</td>\n",
       "      <td>0.630527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>0.697697</td>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.752260</td>\n",
       "      <td>0.833306</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              0         1         2         3\n",
       "count  2.000000  2.000000  2.000000  2.000000\n",
       "mean   0.478978  0.715719  0.482187  0.427748\n",
       "std    0.309316  0.297033  0.381941  0.573546\n",
       "min    0.260258  0.505685  0.212113  0.022190\n",
       "25%    0.369618  0.610702  0.347150  0.224969\n",
       "50%    0.478978  0.715719  0.482187  0.427748\n",
       "75%    0.588337  0.820737  0.617223  0.630527\n",
       "max    0.697697  0.925754  0.752260  0.833306"
      ]
     },
     "execution_count": 924,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.T.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 按轴排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 925,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.260258  0.697697\n",
       "1  0.925754  0.505685\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 925,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.columns=['y','a']\n",
    "s2.indexs=[2,3,4,1]\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 926,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.697697</td>\n",
       "      <td>0.260258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.505685</td>\n",
       "      <td>0.925754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.752260</td>\n",
       "      <td>0.212113</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.022190</td>\n",
       "      <td>0.833306</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          a         y\n",
       "0  0.697697  0.260258\n",
       "1  0.505685  0.925754\n",
       "2  0.752260  0.212113\n",
       "3  0.022190  0.833306"
      ]
     },
     "execution_count": 926,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.sort_index(axis=1,ascending=True)  \n",
    "#axis代表轴，0为行轴，1为列轴\n",
    "#ascending 排序的方式，默认True，表示升序，False则为降序"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 按值排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 927,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\ProgramData\\Anaconda3\\lib\\site-packages\\ipykernel\\__main__.py:1: FutureWarning: sort(columns=....) is deprecated, use sort_values(by=.....)\n",
      "  if __name__ == '__main__':\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "3  0.833306  0.022190\n",
       "1  0.925754  0.505685\n",
       "0  0.260258  0.697697\n",
       "2  0.212113  0.752260"
      ]
     },
     "execution_count": 927,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.sort(columns='a')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 按照标签来获取一个交叉的区域"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 928,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "datas=[0,20,30]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 929,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.925754</td>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.260258  0.697697\n",
       "1  0.925754  0.505685\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 929,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 930,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.505685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          a\n",
       "0  0.697697\n",
       "1  0.505685\n",
       "2  0.752260\n",
       "3  0.022190"
      ]
     },
     "execution_count": 930,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.loc[0:50,['a']]  #提取0~5行的数据，再提取a列的数据\n",
    "# 标签的切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 931,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    0.697697\n",
       "Name: 0, dtype: float64"
      ]
     },
     "execution_count": 931,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.loc[0,['a']]     # 对于返回的对象进行维度缩减"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 932,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6976971977393829"
      ]
     },
     "execution_count": 932,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.loc[0,'a']    # 等同于如下的效果\n",
    "# s2.ix[1:2,'y']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 933,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6976971977393829"
      ]
     },
     "execution_count": 933,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2['a'][0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 934,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "y    0.833306\n",
       "a    0.022190\n",
       "Name: 3, dtype: float64"
      ]
     },
     "execution_count": 934,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.ix[3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 935,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.260258  0.697697\n",
       "1  1.000000  2.000000\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 935,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.ix[1]=[1,2]\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 977,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>f</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.02219</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y        a    f\n",
       "0  0.260258  0.00000  NaN\n",
       "1  0.000000  0.00000  NaN\n",
       "2  0.212113  0.00000  0.0\n",
       "3  0.000000  0.02219  NaN"
      ]
     },
     "execution_count": 977,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.ix[2]\n",
    "s2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 通过位置选择"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 通过传递数值进行位置选择（选择的是行）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 978,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.02219</td>\n",
       "      <td>0.02219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     y        a        a\n",
       "1  0.0  0.00000  0.00000\n",
       "3  0.0  0.02219  0.02219\n",
       "4  NaN      NaN      NaN\n",
       "6  NaN      NaN      NaN"
      ]
     },
     "execution_count": 978,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(s2)\n",
    "s24=s2.reindex(index=[1,3,4,6],columns=list(s3.columns)+['a'])\n",
    "s24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 938,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>cols1</th>\n",
       "      <th>cols2</th>\n",
       "      <th>cols3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   cols1  cols2  cols3\n",
       "a      3      4      5\n",
       "b      3      4      5\n",
       "c      3      4      5"
      ]
     },
     "execution_count": 938,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wx = DataFrame(np.random.random((3,2)))\n",
    "wx.index\n",
    "wx.columns\n",
    "\n",
    "df = pd.DataFrame([[3, 4, 5], [3, 4, 5],[3, 4, 5]], columns=['cols1','cols2','cols3'], index=['a','b','c'])\n",
    "df\n",
    "\n",
    "# df2 = pd.DataFrame([[1, 2, 3],[4, 5, 6]], columns=['col1','col2','col3'], index=['a','b'])\n",
    "# print df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 939,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "cols1    3\n",
       "cols2    4\n",
       "cols3    5\n",
       "Name: a, dtype: int64"
      ]
     },
     "execution_count": 939,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['a']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 940,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.260258  0.697697\n",
       "1  1.000000  2.000000\n",
       "2  0.212113  0.752260\n",
       "3  0.833306  0.022190"
      ]
     },
     "execution_count": 940,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 941,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "y    0.833306\n",
       "a    0.022190\n",
       "Name: 3, dtype: float64"
      ]
     },
     "execution_count": 941,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 通过数值进行切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 942,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.75226</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y        a\n",
       "1  1.000000  2.00000\n",
       "2  0.212113  0.75226"
      ]
     },
     "execution_count": 942,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[1:3]  #切片 行，1-3行，[1,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 943,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: []\n",
       "Index: [1, 2]"
      ]
     },
     "execution_count": 943,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[1:3,2:4] # 切片 行和列,1-3行，2-4列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 通知指定一个位置的列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 944,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.75226</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.02219</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y        a\n",
       "1  1.000000  2.00000\n",
       "2  0.212113  0.75226\n",
       "3  0.833306  0.02219"
      ]
     },
     "execution_count": 944,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[[1,2,3],[0,1]]  #1，2，3行，0，1列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 行切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 945,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.75226</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y        a\n",
       "1  1.000000  2.00000\n",
       "2  0.212113  0.75226"
      ]
     },
     "execution_count": 945,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[1:3,:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 列切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 946,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.697697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.752260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.022190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          a\n",
       "0  0.697697\n",
       "1  2.000000\n",
       "2  0.752260\n",
       "3  0.022190"
      ]
     },
     "execution_count": 946,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2.iloc[:,1:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 获取指定位置的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 947,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "IndexError",
     "evalue": "single positional indexer is out-of-bounds",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-947-0df88c39ae5a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0ms2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0miloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m  \u001b[1;31m# 获取3行3列的数据\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32mD:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m   1292\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1293\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mis\u001b[0m \u001b[0mtuple\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1294\u001b[0;31m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1295\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1296\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_axis\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mD:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_tuple\u001b[0;34m(self, tup)\u001b[0m\n\u001b[1;32m   1542\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_getitem_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1543\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1544\u001b[0;31m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_has_valid_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1545\u001b[0m         \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1546\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_lowerdim\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mD:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_has_valid_tuple\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m    140\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mi\u001b[0m \u001b[1;33m>=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndim\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m    141\u001b[0m                 \u001b[1;32mraise\u001b[0m \u001b[0mIndexingError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'Too many indexers'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_has_valid_type\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mk\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    143\u001b[0m                 raise ValueError(\"Location based indexing can only have [%s] \"\n\u001b[1;32m    144\u001b[0m                                  \"types\" % self._valid_types)\n",
      "\u001b[0;32mD:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_has_valid_type\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m   1510\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1511\u001b[0m         \u001b[1;32melif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1512\u001b[0;31m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_valid_integer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1513\u001b[0m         \u001b[1;32melif\u001b[0m \u001b[0mis_list_like_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1514\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_valid_list_like\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mD:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_is_valid_integer\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m   1524\u001b[0m         \u001b[0ml\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0max\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1525\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mkey\u001b[0m \u001b[1;33m>=\u001b[0m \u001b[0ml\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mkey\u001b[0m \u001b[1;33m<\u001b[0m \u001b[1;33m-\u001b[0m\u001b[0ml\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1526\u001b[0;31m             \u001b[1;32mraise\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"single positional indexer is out-of-bounds\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1527\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1528\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mIndexError\u001b[0m: single positional indexer is out-of-bounds"
     ]
    }
   ],
   "source": [
    "s2.iloc[2,2]  # 获取3行3列的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2.iat[2,1]   #快速获取指定位置的数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 布尔索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用一个单独列的值来选择数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2[s2.a>0.7]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 整体过滤"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2[s2>0.5]  #把所有不满足条件的全部置空(where)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### isin() 过滤数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s3=s2.copy()\n",
    "s3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s3['a'][0]=1.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s3[s3['a'].isin([1.0,1.4])]   \n",
    "#检索a列中的数据，将满足的行返回出来"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 设置"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 新增一个列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\n",
    "s1=Series([i for i in range(5)])\n",
    "s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 950,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2['y'][20]=11"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 951,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>f</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "      <td>13.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a     f\n",
       "0  0.260258  0.697697   NaN\n",
       "1  1.000000  2.000000   NaN\n",
       "2  0.212113  0.752260  13.0\n",
       "3  0.833306  0.022190   NaN"
      ]
     },
     "execution_count": 951,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 通过便签设置值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 952,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2.loc[2,'f']=13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 953,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>f</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.697697</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.752260</td>\n",
       "      <td>13.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.833306</td>\n",
       "      <td>0.022190</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a     f\n",
       "0  0.260258  0.697697   NaN\n",
       "1  1.000000  2.000000   NaN\n",
       "2  0.212113  0.752260  13.0\n",
       "3  0.833306  0.022190   NaN"
      ]
     },
     "execution_count": 953,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 954,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2[s2>0.5]=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 955,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>f</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.260258</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.212113</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.02219</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y        a    f\n",
       "0  0.260258  0.00000  NaN\n",
       "1  0.000000  0.00000  NaN\n",
       "2  0.212113  0.00000  0.0\n",
       "3  0.000000  0.02219  NaN"
      ]
     },
     "execution_count": 955,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 986,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.879879</td>\n",
       "      <td>1.230000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.208348</td>\n",
       "      <td>0.602554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.391591</td>\n",
       "      <td>0.998000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.879879  1.230000\n",
       "1  1.000000  2.000000\n",
       "2  0.208348  0.602554\n",
       "3  0.391591  0.998000"
      ]
     },
     "execution_count": 986,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4=s3[s3.a<0.06]\n",
    "s3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 缺失值的处理"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### reindex() 方法可以对指定的轴上的索引进行修改（增加/删除）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 994,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.879879</td>\n",
       "      <td>1.230000</td>\n",
       "      <td>1.230000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.208348</td>\n",
       "      <td>0.602554</td>\n",
       "      <td>0.602554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.391591</td>\n",
       "      <td>0.998000</td>\n",
       "      <td>0.998000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a         a\n",
       "0  0.879879  1.230000  1.230000\n",
       "1  1.000000  2.000000  2.000000\n",
       "2  0.208348  0.602554  0.602554\n",
       "3  0.391591  0.998000  0.998000"
      ]
     },
     "execution_count": 994,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4=s3.reindex(index=[i for i in range(4)],columns=list(s3.columns)+['a'])\n",
    "s4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 995,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.23"
      ]
     },
     "execution_count": 995,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3.iat[0,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1008,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN"
      ]
     },
     "execution_count": 1008,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4=DataFrame(np.array(\n",
    "    [\n",
    "        [1,np.nan,2,3],\n",
    "        [2,3,4,np.nan]\n",
    "    ]\n",
    "))\n",
    "s4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1009,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN\n",
       "5  1.0  2.0  3.0  4.0"
      ]
     },
     "execution_count": 1009,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4.ix[5]=[1,2,3,4]\n",
    "s4"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 去除包含缺失值的行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1010,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "5  1.0  2.0  3.0  4.0"
      ]
     },
     "execution_count": 1010,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4.dropna(how='any')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1011,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method dropna in module pandas.core.frame:\n",
      "\n",
      "dropna(axis=0, how='any', thresh=None, subset=None, inplace=False) method of pandas.core.frame.DataFrame instance\n",
      "    Return object with labels on given axis omitted where alternately any\n",
      "    or all of the data are missing\n",
      "    \n",
      "    Parameters\n",
      "    ----------\n",
      "    axis : {0 or 'index', 1 or 'columns'}, or tuple/list thereof\n",
      "        Pass tuple or list to drop on multiple axes\n",
      "    how : {'any', 'all'}\n",
      "        * any : if any NA values are present, drop that label\n",
      "        * all : if all values are NA, drop that label\n",
      "    thresh : int, default None\n",
      "        int value : require that many non-NA values\n",
      "    subset : array-like\n",
      "        Labels along other axis to consider, e.g. if you are dropping rows\n",
      "        these would be a list of columns to include\n",
      "    inplace : boolean, default False\n",
      "        If True, do operation inplace and return None.\n",
      "    \n",
      "    Returns\n",
      "    -------\n",
      "    dropped : DataFrame\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(s4.dropna)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 对缺失值的替换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1012,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "s4=DataFrame(np.array(\n",
    "    [\n",
    "        [1,np.nan,2,3],\n",
    "        [2,3,4,np.nan],\n",
    "        [1,3,4,5]\n",
    "    ]\n",
    "))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 321,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN\n",
       "2  1.0  3.0  4.0  5.0"
      ]
     },
     "execution_count": 321,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1013,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  0.0  2.0  3.0\n",
       "1  2.0  3.0  4.0  0.0\n",
       "2  1.0  3.0  4.0  5.0"
      ]
     },
     "execution_count": 1013,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4.fillna(value=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1014,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "s5=DataFrame(np.array(\n",
    "    [\n",
    "        [1,np.nan,2,3],\n",
    "        [2,3,4,np.nan],\n",
    "        [1,3,4,5]\n",
    "    ]\n",
    "))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 对数据进行布尔填充，空值的判断"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1015,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       0      1      2      3\n",
       "0  False   True  False  False\n",
       "1  False  False  False   True\n",
       "2  False  False  False  False"
      ]
     },
     "execution_count": 1015,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.isnull(s5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1016,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN\n",
       "2  1.0  3.0  4.0  5.0"
      ]
     },
     "execution_count": 1016,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s5"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 其他操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据描述性统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1024,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "y    0.619955\n",
       "a    1.207638\n",
       "dtype: float64"
      ]
     },
     "execution_count": 1024,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1025,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.879879</td>\n",
       "      <td>1.230000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.208348</td>\n",
       "      <td>0.602554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.391591</td>\n",
       "      <td>0.998000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          y         a\n",
       "0  0.879879  1.230000\n",
       "1  1.000000  2.000000\n",
       "2  0.208348  0.602554\n",
       "3  0.391591  0.998000"
      ]
     },
     "execution_count": 1025,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1028,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.054939\n",
       "1    1.500000\n",
       "2    0.405451\n",
       "3    0.694796\n",
       "dtype: float64"
      ]
     },
     "execution_count": 1028,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3.mean(1)  #对固定的轴进行统计操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1029,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method mean in module pandas.core.frame:\n",
      "\n",
      "mean(axis=None, skipna=None, level=None, numeric_only=None, **kwargs) method of pandas.core.frame.DataFrame instance\n",
      "    Return the mean of the values for the requested axis\n",
      "    \n",
      "    Parameters\n",
      "    ----------\n",
      "    axis : {index (0), columns (1)}\n",
      "    skipna : boolean, default True\n",
      "        Exclude NA/null values. If an entire row/column is NA, the result\n",
      "        will be NA\n",
      "    level : int or level name, default None\n",
      "        If the axis is a MultiIndex (hierarchical), count along a\n",
      "        particular level, collapsing into a Series\n",
      "    numeric_only : boolean, default None\n",
      "        Include only float, int, boolean data. If None, will attempt to use\n",
      "        everything, then use only numeric data\n",
      "    \n",
      "    Returns\n",
      "    -------\n",
      "    mean : Series or DataFrame (if level specified)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(s3.mean)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1034,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN\n",
       "2  1.0  3.0  4.0  5.0"
      ]
     },
     "execution_count": 1034,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1035,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1     2    3\n",
       "0  1.0  NaN   2.0  3.0\n",
       "1  3.0  3.0   6.0  NaN\n",
       "2  4.0  6.0  10.0  8.0"
      ]
     },
     "execution_count": 1035,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4.apply(np.cumsum)   #对数据应用函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1036,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function cumsum in module numpy.core.fromnumeric:\n",
      "\n",
      "cumsum(a, axis=None, dtype=None, out=None)\n",
      "    Return the cumulative sum of the elements along a given axis.\n",
      "    \n",
      "    Parameters\n",
      "    ----------\n",
      "    a : array_like\n",
      "        Input array.\n",
      "    axis : int, optional\n",
      "        Axis along which the cumulative sum is computed. The default\n",
      "        (None) is to compute the cumsum over the flattened array.\n",
      "    dtype : dtype, optional\n",
      "        Type of the returned array and of the accumulator in which the\n",
      "        elements are summed.  If `dtype` is not specified, it defaults\n",
      "        to the dtype of `a`, unless `a` has an integer dtype with a\n",
      "        precision less than that of the default platform integer.  In\n",
      "        that case, the default platform integer is used.\n",
      "    out : ndarray, optional\n",
      "        Alternative output array in which to place the result. It must\n",
      "        have the same shape and buffer length as the expected output\n",
      "        but the type will be cast if necessary. See `doc.ufuncs`\n",
      "        (Section \"Output arguments\") for more details.\n",
      "    \n",
      "    Returns\n",
      "    -------\n",
      "    cumsum_along_axis : ndarray.\n",
      "        A new array holding the result is returned unless `out` is\n",
      "        specified, in which case a reference to `out` is returned. The\n",
      "        result has the same size as `a`, and the same shape as `a` if\n",
      "        `axis` is not None or `a` is a 1-d array.\n",
      "    \n",
      "    \n",
      "    See Also\n",
      "    --------\n",
      "    sum : Sum array elements.\n",
      "    \n",
      "    trapz : Integration of array values using the composite trapezoidal rule.\n",
      "    \n",
      "    diff :  Calculate the n-th discrete difference along given axis.\n",
      "    \n",
      "    Notes\n",
      "    -----\n",
      "    Arithmetic is modular when using integer types, and no error is\n",
      "    raised on overflow.\n",
      "    \n",
      "    Examples\n",
      "    --------\n",
      "    >>> a = np.array([[1,2,3], [4,5,6]])\n",
      "    >>> a\n",
      "    array([[1, 2, 3],\n",
      "           [4, 5, 6]])\n",
      "    >>> np.cumsum(a)\n",
      "    array([ 1,  3,  6, 10, 15, 21])\n",
      "    >>> np.cumsum(a, dtype=float)     # specifies type of output value(s)\n",
      "    array([  1.,   3.,   6.,  10.,  15.,  21.])\n",
      "    \n",
      "    >>> np.cumsum(a,axis=0)      # sum over rows for each of the 3 columns\n",
      "    array([[1, 2, 3],\n",
      "           [5, 7, 9]])\n",
      "    >>> np.cumsum(a,axis=1)      # sum over columns for each of the 2 rows\n",
      "    array([[ 1,  3,  6],\n",
      "           [ 4,  9, 15]])\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(np.cumsum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1037,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    0.0\n",
       "2    2.0\n",
       "3    2.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 1037,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4.apply(lambda x:x.max()-x.min())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1038,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0    1    2    3\n",
       "0  1.0  NaN  2.0  3.0\n",
       "1  2.0  3.0  4.0  NaN\n",
       "2  1.0  3.0  4.0  5.0"
      ]
     },
     "execution_count": 1038,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s4"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1039,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "n1=np.random.randint(0,7,size=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1040,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([5, 2, 3, 0, 4, 4, 4, 3, 1, 3])"
      ]
     },
     "execution_count": 1040,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "n1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s1=pd.Series(n1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    4\n",
       "2    2\n",
       "1    2\n",
       "6    1\n",
       "4    1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1.value_counts()   # 数据元素的统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "n1=np.random.randint(0,10,size=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df=Series(n1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     5\n",
       "1     7\n",
       "2     1\n",
       "3     3\n",
       "4     8\n",
       "5     1\n",
       "6     9\n",
       "7     7\n",
       "8     5\n",
       "9     6\n",
       "10    3\n",
       "11    2\n",
       "12    9\n",
       "13    1\n",
       "14    8\n",
       "15    2\n",
       "16    0\n",
       "17    8\n",
       "18    3\n",
       "19    6\n",
       "20    6\n",
       "21    6\n",
       "22    0\n",
       "23    4\n",
       "24    4\n",
       "25    8\n",
       "26    6\n",
       "27    9\n",
       "28    5\n",
       "29    3\n",
       "     ..\n",
       "70    6\n",
       "71    7\n",
       "72    0\n",
       "73    2\n",
       "74    6\n",
       "75    3\n",
       "76    8\n",
       "77    4\n",
       "78    5\n",
       "79    3\n",
       "80    9\n",
       "81    0\n",
       "82    7\n",
       "83    9\n",
       "84    7\n",
       "85    0\n",
       "86    0\n",
       "87    6\n",
       "88    1\n",
       "89    3\n",
       "90    6\n",
       "91    1\n",
       "92    4\n",
       "93    2\n",
       "94    1\n",
       "95    9\n",
       "96    9\n",
       "97    3\n",
       "98    0\n",
       "99    2\n",
       "dtype: int32"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6    14\n",
       "7    11\n",
       "0    11\n",
       "5    10\n",
       "4    10\n",
       "3    10\n",
       "2     9\n",
       "1     9\n",
       "9     8\n",
       "8     8\n",
       "dtype: int64"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xa5d6da0>"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADslJREFUeJzt3VGIXOd5xvHnqTYZR9o0dlE7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ajVlAQAGVfgMPSIu2v5DSf8iaYekRyPi\nhcoqAwAMpNQeekR8TdLXKqqln9LbNsnQj3X0ohf96LVt+uGIqLsGAEAFuPQfAJLYEoHOLQbW2L7J\n9lO2z9h+wfahumsaBbZ32H7W9vG6a6mb7ettH7X9ou2ztj9Ud011sf257ufktO1529fVXdOwjXyg\nc4uBHhcl3RsRN0u6RdIfbONeXOqQpLN1FzEiHpL09Yj4FUm/pm3aF9s3SvqMpHZE7NPaFzfurLeq\n4Rv5QBe3GPh/EbEcEae6j3+ktQ/rtr461/YeSR+X9HDdtdTN9vskfUTSI5IUEe9ExJv1VlWrMUnv\nsT0maaekH9Rcz9BthUDnFgOXYXtS0gcknai3ktp9UdJ9kn5SdyEjYK+k1yV9qbsF9bDtXXUXVYeI\neFXSX0p6WdKypB9GxBP1VjV8WyHQsYHtcUlfkfTZiHir7nrqYvt2SecjYqnuWkbEmKRfl/S3EfEB\nSW9L2pb/5mT7Bq39Jr9X0i9K2mX7rnqrGr6tEOibusXAdmH7XVoL8yMRcazuemp2q6Tfsf19rW3F\nfdT24/WWVKtzks5FxE9/azuqtYDfjm6T9L2IeD0ifizpmKQP11zT0G2FQOcWA122rbX90bMR8YW6\n66lbRDwQEXsiYlJr74tvRkT6s7AriYjXJL1iu9U9dEDSmRpLqtPLkm6xvbP7uTmgbfAPxEO/22JZ\n3GKgx62S7pb0vO3nusf+qHvFLiBJn5Z0pHvy85KkT9VcTy0i4oTto5JOae3bYc9qG1wxypWiAJDE\nVthyAQBsAoEOAEkQ6ACQBIEOAEkQ6ACQBIEOAEkQ6ACQBIEOAEn8H+38+zc3ezGRAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xa357d68>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.hist(color='k',alpha=0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# 载入matplotlib 库\n",
    "% matplotlib inline     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xa357dd8>"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADslJREFUeJzt3VGIXOd5xvHnqTYZR9o0dlE7bC3TFSVMMaIl1RCcGNLd\nyA1qY+pe9MJLbZJg2Js2UYLB2C0l8kVpoSWNoaVlsR0HLHZLFZWmIqQ2iRdTcES1slPLkqcJTmrL\nWVc2W8eRW9YReXuxk65mkTQ755zRmX33/wPjmbPfN9/Ly8zD2U9zzjoiBADY+n6m7gIAANUg0AEg\nCQIdAJIg0AEgCQIdAJIg0AEgCQIdAJIg0AEgCQIdAJIYu5aL7d69OyYnJwvNffvtt7Vr165qC9rC\n6Mc6etGLfvTK0I+lpaU3IuLn+427poE+OTmpkydPFpq7uLioqampagvawujHOnrRi370ytAP2/+5\nmXFsuQBAEgQ6ACRBoANAEgQ6ACRBoANAEn0D3fajts/bPn2Zn91rO2zvHk55AIDN2swZ+mOSDm48\naPsmSR+T9HLFNQEACugb6BHxtKSVy/zoryTdJ4m/YQcAI6DQHrrtOyS9GhHfrrgeAEBB3swfibY9\nKel4ROyzvVPSU5I+FhE/tP19Se2IeOMKc2clzUpSs9ncv7CwUKjQCxcuaHx8vNDcjOjHuq3ei+Xl\n5Upfr9FoaHV1te+4iYmJStcdVVv9/SFJ09PTSxHR7jeuyKX/vyxpr6Rv25akPZJO2f5gRLy2cXBE\nzEmak6R2ux1FL8HNcPlulejHuq3ei8OHD1f6eq1WS51Op++4mZmZStcdVVv9/TGIgQM9Ip6X9As/\nfd7vDB0AcG1s5muL85KekdS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62S7pb0vO3nusf+qHvFLiBJn5Z0pHvy85KkT9VcTy0i4oTto5JOae3bYc9qG1wxypWiAJDE\nVthyAQBsAoEOAEkQ6ACQBIEOAEkQ6ACQBIEOAEkQ6ACQBIEOAEn8H+38+zc3ezGRAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xa3577b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.hist(color='k',alpha=0.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 箱形图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "n1=np.random.random((100))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.51441648,  0.69120919,  0.67463311,  0.07755575,  0.11897521,\n",
       "        0.85606266,  0.01892499,  0.68286614,  0.96759714,  0.75886043,\n",
       "        0.92674336,  0.96813507,  0.0331304 ,  0.97272032,  0.8207354 ,\n",
       "        0.89801665,  0.09075269,  0.84542993,  0.05003552,  0.20509004,\n",
       "        0.43171189,  0.61528976,  0.4686504 ,  0.84458408,  0.85887567,\n",
       "        0.02822806,  0.47812193,  0.59781756,  0.26232118,  0.32295717,\n",
       "        0.02866012,  0.50910313,  0.15066109,  0.39630853,  0.07316902,\n",
       "        0.90782858,  0.42268617,  0.86433853,  0.32382531,  0.34961202,\n",
       "        0.01326099,  0.33384725,  0.06144228,  0.53356416,  0.56646535,\n",
       "        0.4008755 ,  0.21957675,  0.79483401,  0.66834319,  0.01214434,\n",
       "        0.66969766,  0.00209178,  0.77925266,  0.79635783,  0.16900569,\n",
       "        0.90561475,  0.11940892,  0.86347791,  0.2508261 ,  0.15403844,\n",
       "        0.52743267,  0.38634171,  0.96066766,  0.86057256,  0.51131965,\n",
       "        0.71309059,  0.78147279,  0.21164954,  0.96914085,  0.10384533,\n",
       "        0.67446276,  0.20946134,  0.91507728,  0.7664334 ,  0.49517147,\n",
       "        0.85596291,  0.37435044,  0.12945011,  0.35400397,  0.28157907,\n",
       "        0.79768547,  0.47303255,  0.35438875,  0.40598831,  0.83933257,\n",
       "        0.12754617,  0.45827348,  0.27990138,  0.79894019,  0.58363355,\n",
       "        0.46675129,  0.85251294,  0.55705788,  0.30977131,  0.22904687,\n",
       "        0.13040744,  0.09121905,  0.36396351,  0.39204958,  0.23061139])"
      ]
     },
     "execution_count": 143,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "n1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.514416</td>\n",
       "      <td>0.691209</td>\n",
       "      <td>0.674633</td>\n",
       "      <td>0.077556</td>\n",
       "      <td>0.118975</td>\n",
       "      <td>0.856063</td>\n",
       "      <td>0.018925</td>\n",
       "      <td>0.682866</td>\n",
       "      <td>0.967597</td>\n",
       "      <td>0.758860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.926743</td>\n",
       "      <td>0.968135</td>\n",
       "      <td>0.033130</td>\n",
       "      <td>0.972720</td>\n",
       "      <td>0.820735</td>\n",
       "      <td>0.898017</td>\n",
       "      <td>0.090753</td>\n",
       "      <td>0.845430</td>\n",
       "      <td>0.050036</td>\n",
       "      <td>0.205090</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.431712</td>\n",
       "      <td>0.615290</td>\n",
       "      <td>0.468650</td>\n",
       "      <td>0.844584</td>\n",
       "      <td>0.858876</td>\n",
       "      <td>0.028228</td>\n",
       "      <td>0.478122</td>\n",
       "      <td>0.597818</td>\n",
       "      <td>0.262321</td>\n",
       "      <td>0.322957</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.028660</td>\n",
       "      <td>0.509103</td>\n",
       "      <td>0.150661</td>\n",
       "      <td>0.396309</td>\n",
       "      <td>0.073169</td>\n",
       "      <td>0.907829</td>\n",
       "      <td>0.422686</td>\n",
       "      <td>0.864339</td>\n",
       "      <td>0.323825</td>\n",
       "      <td>0.349612</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.013261</td>\n",
       "      <td>0.333847</td>\n",
       "      <td>0.061442</td>\n",
       "      <td>0.533564</td>\n",
       "      <td>0.566465</td>\n",
       "      <td>0.400875</td>\n",
       "      <td>0.219577</td>\n",
       "      <td>0.794834</td>\n",
       "      <td>0.668343</td>\n",
       "      <td>0.012144</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.669698</td>\n",
       "      <td>0.002092</td>\n",
       "      <td>0.779253</td>\n",
       "      <td>0.796358</td>\n",
       "      <td>0.169006</td>\n",
       "      <td>0.905615</td>\n",
       "      <td>0.119409</td>\n",
       "      <td>0.863478</td>\n",
       "      <td>0.250826</td>\n",
       "      <td>0.154038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.527433</td>\n",
       "      <td>0.386342</td>\n",
       "      <td>0.960668</td>\n",
       "      <td>0.860573</td>\n",
       "      <td>0.511320</td>\n",
       "      <td>0.713091</td>\n",
       "      <td>0.781473</td>\n",
       "      <td>0.211650</td>\n",
       "      <td>0.969141</td>\n",
       "      <td>0.103845</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.674463</td>\n",
       "      <td>0.209461</td>\n",
       "      <td>0.915077</td>\n",
       "      <td>0.766433</td>\n",
       "      <td>0.495171</td>\n",
       "      <td>0.855963</td>\n",
       "      <td>0.374350</td>\n",
       "      <td>0.129450</td>\n",
       "      <td>0.354004</td>\n",
       "      <td>0.281579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.797685</td>\n",
       "      <td>0.473033</td>\n",
       "      <td>0.354389</td>\n",
       "      <td>0.405988</td>\n",
       "      <td>0.839333</td>\n",
       "      <td>0.127546</td>\n",
       "      <td>0.458273</td>\n",
       "      <td>0.279901</td>\n",
       "      <td>0.798940</td>\n",
       "      <td>0.583634</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.466751</td>\n",
       "      <td>0.852513</td>\n",
       "      <td>0.557058</td>\n",
       "      <td>0.309771</td>\n",
       "      <td>0.229047</td>\n",
       "      <td>0.130407</td>\n",
       "      <td>0.091219</td>\n",
       "      <td>0.363964</td>\n",
       "      <td>0.392050</td>\n",
       "      <td>0.230611</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1         2         3         4         5         6  \\\n",
       "0  0.514416  0.691209  0.674633  0.077556  0.118975  0.856063  0.018925   \n",
       "1  0.926743  0.968135  0.033130  0.972720  0.820735  0.898017  0.090753   \n",
       "2  0.431712  0.615290  0.468650  0.844584  0.858876  0.028228  0.478122   \n",
       "3  0.028660  0.509103  0.150661  0.396309  0.073169  0.907829  0.422686   \n",
       "4  0.013261  0.333847  0.061442  0.533564  0.566465  0.400875  0.219577   \n",
       "5  0.669698  0.002092  0.779253  0.796358  0.169006  0.905615  0.119409   \n",
       "6  0.527433  0.386342  0.960668  0.860573  0.511320  0.713091  0.781473   \n",
       "7  0.674463  0.209461  0.915077  0.766433  0.495171  0.855963  0.374350   \n",
       "8  0.797685  0.473033  0.354389  0.405988  0.839333  0.127546  0.458273   \n",
       "9  0.466751  0.852513  0.557058  0.309771  0.229047  0.130407  0.091219   \n",
       "\n",
       "          7         8         9  \n",
       "0  0.682866  0.967597  0.758860  \n",
       "1  0.845430  0.050036  0.205090  \n",
       "2  0.597818  0.262321  0.322957  \n",
       "3  0.864339  0.323825  0.349612  \n",
       "4  0.794834  0.668343  0.012144  \n",
       "5  0.863478  0.250826  0.154038  \n",
       "6  0.211650  0.969141  0.103845  \n",
       "7  0.129450  0.354004  0.281579  \n",
       "8  0.279901  0.798940  0.583634  \n",
       "9  0.363964  0.392050  0.230611  "
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2=DataFrame(n1.reshape(10,-1))\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xc57d4e0>"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFb5JREFUeJzt3X+M3PWd3/HnO2vQEZuGU8itAOewq+PSBdP0sikkPTf1\n1k1k7k5HW6UqeykRkSMXCay7VkptaqlRdLJEQn+cTuHinliKT8VrXROupcYFeu7undA1KSYXEps9\nIgc42JAriXLlWBIJTN79YwZYj9fz/a7nOzPf+e7zIa3Y78x3v9+Xh9nXfufz/RWZiSSpWd4x7ACS\npOpZ7pLUQJa7JDWQ5S5JDWS5S1IDWe6S1ECWuyQ1kOUuSQ1kuUtSA60b1oovvfTS3LRpU0/LePXV\nV1m/fn01gUY4Q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J4\nYdn0IkMotLqJiE3AL9Daah7G+sci4hvAS8D/zMxh5Pgt4F8BPxnCupdL4A8j4on2fYMHbTPwfeA/\ntYeo7omI9UPIsdxNwOygV5qZ3wX+LfA88D1aNxJ6dNA5aG21/92IeHdEvJPW/S/eW/AzPRnFcleH\niNgAfAX4jcz8q2FkyMw3MvNv0brF4nURsWWQ64+IXwFeyswnBrnec9jafi1uAG6LiI8MeP3raA0Z\nfikzfwF4FRjKvimA9h3cfhX4L0NY90/T+mS/GbgcWB8R/2zQOTJzAfg88CjwMPAN4I1+rnMUy32g\n92utu4i4gFax35+ZDww7T/vj/xywY8Cr/kXgVyPiOVpDdX8/Iv7zgDMAb20tkpkvAX9AayhxkBaB\nxWWfnr5Mq+yH5Qbg65n5f4ew7n8APJuZ38/M14EHgL8zhBxk5kxmTmbmR4C/pLWPrG9GsdzL3NN1\nTYiIoDWuupCZ/36IOd4TEZe0v78I+CjwZ4PMkJl3ZObGzNxE6z3xvzJz4FtoEbE+Ii5+83vgY7Q+\nkg9MZv4F8EJEvK/90HbgqUFm6DDNEIZk2p4HPhQR72z/vmyntW9q4CLiZ9r//Vla4+2H+rm+UrfZ\nq5M8xz1dB50jImaBbcClEbEIfDYzZwYc4xeBm4Fvtce7Af51tm6LOEiXAQcjYozWBsPvZ+bQDkUc\nsnHgD1o9wjrgUGY+PIQcu4H72xtAzzCk+xq3/8B9FPjnw1h/Zn4tIr4MfB04DfwpwztT9SsR8W7g\ndeC2fu/k9gxVSWqgURyWkSQVsNwlqYEsd0lqIMtdkhrIcpekBrLcJamBLHdJaiDLXZIa6P8DnuXu\nqqqMxyQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc41c400>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df2.boxplot()   #箱形图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 抖动图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "def jitter(series,factor):\n",
    "    z=float(series.max())-float(series.min()) #最大值和最小值差值\n",
    "    a=float(factor)*z/50   # 抖动距离使用factor 阈值\n",
    "    return series.apply(lambda x: x+np.random.uniform(-a,a))\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "n1=np.random.randint(50,60,size=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s1=DataFrame(n1.reshape((50,2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "s2=jitter(s1[0],1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     58.925946\n",
       "1     56.137901\n",
       "2     54.033330\n",
       "3     55.033222\n",
       "4     53.110335\n",
       "5     58.938254\n",
       "6     54.868502\n",
       "7     49.918700\n",
       "8     58.048623\n",
       "9     58.118049\n",
       "10    58.951935\n",
       "11    50.943135\n",
       "12    56.910848\n",
       "13    55.882688\n",
       "14    56.838441\n",
       "15    56.051447\n",
       "16    55.893940\n",
       "17    51.830653\n",
       "18    54.999272\n",
       "19    58.027954\n",
       "20    51.117863\n",
       "21    50.891903\n",
       "22    58.993783\n",
       "23    50.870987\n",
       "24    51.855031\n",
       "25    51.065638\n",
       "26    51.975911\n",
       "27    55.080188\n",
       "28    56.125667\n",
       "29    51.099762\n",
       "30    56.140233\n",
       "31    50.939344\n",
       "32    52.052261\n",
       "33    54.118298\n",
       "34    55.830023\n",
       "35    50.848915\n",
       "36    58.129951\n",
       "37    54.960994\n",
       "38    51.826784\n",
       "39    55.890022\n",
       "40    56.033395\n",
       "41    54.872485\n",
       "42    51.943565\n",
       "43    59.141408\n",
       "44    55.821205\n",
       "45    53.908311\n",
       "46    53.161836\n",
       "47    56.035739\n",
       "48    58.860843\n",
       "49    55.952162\n",
       "Name: 0, dtype: float64"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "s3=jitter(s1[1],1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     53.850472\n",
       "1     51.032155\n",
       "2     57.135457\n",
       "3     53.071839\n",
       "4     52.084435\n",
       "5     58.972222\n",
       "6     54.076519\n",
       "7     59.035263\n",
       "8     49.990527\n",
       "9     51.977917\n",
       "10    50.009007\n",
       "11    54.005163\n",
       "12    55.915467\n",
       "13    55.997688\n",
       "14    57.850602\n",
       "15    50.049348\n",
       "16    54.177156\n",
       "17    50.038595\n",
       "18    58.121546\n",
       "19    52.016593\n",
       "20    59.067756\n",
       "21    53.154229\n",
       "22    57.965864\n",
       "23    51.824730\n",
       "24    58.038008\n",
       "25    57.114516\n",
       "26    55.164359\n",
       "27    55.066041\n",
       "28    55.073638\n",
       "29    49.838791\n",
       "30    54.103512\n",
       "31    57.140706\n",
       "32    55.027021\n",
       "33    56.835774\n",
       "34    54.088885\n",
       "35    58.966552\n",
       "36    56.977261\n",
       "37    56.859437\n",
       "38    56.960438\n",
       "39    53.019868\n",
       "40    55.151974\n",
       "41    52.949362\n",
       "42    55.072755\n",
       "43    55.985342\n",
       "44    56.878026\n",
       "45    54.010650\n",
       "46    49.929365\n",
       "47    49.960169\n",
       "48    57.990518\n",
       "49    54.031809\n",
       "Name: 1, dtype: float64"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df2=s1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "df2[0]=s2\n",
    "df2[1]=s3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>58.925946</td>\n",
       "      <td>53.850472</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>56.137901</td>\n",
       "      <td>51.032155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>54.033330</td>\n",
       "      <td>57.135457</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>55.033222</td>\n",
       "      <td>53.071839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>53.110335</td>\n",
       "      <td>52.084435</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>58.938254</td>\n",
       "      <td>58.972222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>54.868502</td>\n",
       "      <td>54.076519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>49.918700</td>\n",
       "      <td>59.035263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>58.048623</td>\n",
       "      <td>49.990527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>58.118049</td>\n",
       "      <td>51.977917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>58.951935</td>\n",
       "      <td>50.009007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>50.943135</td>\n",
       "      <td>54.005163</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>56.910848</td>\n",
       "      <td>55.915467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>55.882688</td>\n",
       "      <td>55.997688</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>56.838441</td>\n",
       "      <td>57.850602</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>56.051447</td>\n",
       "      <td>50.049348</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>55.893940</td>\n",
       "      <td>54.177156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>51.830653</td>\n",
       "      <td>50.038595</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>54.999272</td>\n",
       "      <td>58.121546</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>58.027954</td>\n",
       "      <td>52.016593</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>51.117863</td>\n",
       "      <td>59.067756</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>50.891903</td>\n",
       "      <td>53.154229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>58.993783</td>\n",
       "      <td>57.965864</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>50.870987</td>\n",
       "      <td>51.824730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>51.855031</td>\n",
       "      <td>58.038008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>51.065638</td>\n",
       "      <td>57.114516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>51.975911</td>\n",
       "      <td>55.164359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>55.080188</td>\n",
       "      <td>55.066041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>56.125667</td>\n",
       "      <td>55.073638</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>51.099762</td>\n",
       "      <td>49.838791</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>56.140233</td>\n",
       "      <td>54.103512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>50.939344</td>\n",
       "      <td>57.140706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>52.052261</td>\n",
       "      <td>55.027021</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>54.118298</td>\n",
       "      <td>56.835774</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>55.830023</td>\n",
       "      <td>54.088885</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>50.848915</td>\n",
       "      <td>58.966552</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>58.129951</td>\n",
       "      <td>56.977261</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>54.960994</td>\n",
       "      <td>56.859437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>51.826784</td>\n",
       "      <td>56.960438</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>55.890022</td>\n",
       "      <td>53.019868</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>56.033395</td>\n",
       "      <td>55.151974</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>54.872485</td>\n",
       "      <td>52.949362</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>51.943565</td>\n",
       "      <td>55.072755</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>59.141408</td>\n",
       "      <td>55.985342</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>55.821205</td>\n",
       "      <td>56.878026</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>53.908311</td>\n",
       "      <td>54.010650</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>53.161836</td>\n",
       "      <td>49.929365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>56.035739</td>\n",
       "      <td>49.960169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>58.860843</td>\n",
       "      <td>57.990518</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>55.952162</td>\n",
       "      <td>54.031809</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            0          1\n",
       "0   58.925946  53.850472\n",
       "1   56.137901  51.032155\n",
       "2   54.033330  57.135457\n",
       "3   55.033222  53.071839\n",
       "4   53.110335  52.084435\n",
       "5   58.938254  58.972222\n",
       "6   54.868502  54.076519\n",
       "7   49.918700  59.035263\n",
       "8   58.048623  49.990527\n",
       "9   58.118049  51.977917\n",
       "10  58.951935  50.009007\n",
       "11  50.943135  54.005163\n",
       "12  56.910848  55.915467\n",
       "13  55.882688  55.997688\n",
       "14  56.838441  57.850602\n",
       "15  56.051447  50.049348\n",
       "16  55.893940  54.177156\n",
       "17  51.830653  50.038595\n",
       "18  54.999272  58.121546\n",
       "19  58.027954  52.016593\n",
       "20  51.117863  59.067756\n",
       "21  50.891903  53.154229\n",
       "22  58.993783  57.965864\n",
       "23  50.870987  51.824730\n",
       "24  51.855031  58.038008\n",
       "25  51.065638  57.114516\n",
       "26  51.975911  55.164359\n",
       "27  55.080188  55.066041\n",
       "28  56.125667  55.073638\n",
       "29  51.099762  49.838791\n",
       "30  56.140233  54.103512\n",
       "31  50.939344  57.140706\n",
       "32  52.052261  55.027021\n",
       "33  54.118298  56.835774\n",
       "34  55.830023  54.088885\n",
       "35  50.848915  58.966552\n",
       "36  58.129951  56.977261\n",
       "37  54.960994  56.859437\n",
       "38  51.826784  56.960438\n",
       "39  55.890022  53.019868\n",
       "40  56.033395  55.151974\n",
       "41  54.872485  52.949362\n",
       "42  51.943565  55.072755\n",
       "43  59.141408  55.985342\n",
       "44  55.821205  56.878026\n",
       "45  53.908311  54.010650\n",
       "46  53.161836  49.929365\n",
       "47  56.035739  49.960169\n",
       "48  58.860843  57.990518\n",
       "49  55.952162  54.031809"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF7pJREFUeJzt3XtsXGeZx/HvY4/vqd12nRu0SVrakgpEKupW+aMUAmwE\nBFr+QP1nVy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v2gEWaj2fnwFWBz4Liy1qwdCsCFwEbgGqr1xS/19n6G3KwdPgJ83t1/amY3Ad8D3hs0\nyhRFMSJw9wO1j0eA7cC1wJ/NbDVA7WPbD4EXaQfM7KPAB4G/afMLHmjaDu8ELgH21J4XXwQ8YWar\nggWZgUXOh/3Az7zqMaBCde2dtrVIO9wC/Kz2LT+pbWtbbZ8IzGzAzM6rv6ba63sKeIDqwab28edh\nIszGYu1gZu+j+lz8BncvhYwxC4u0w+PuvsLd17n7Oqo3w7e7++GAoaZqieviP4FNte1XAN20zwJs\nr7BEOxyk2kEAeDfwdJgIsxHDo6GVwHYzg+rve7+7P2Rmj1Md9n6C6sqmNwWMMQuLtcMzQA/VITHA\nqLt/KlyYqWvaDmFDCmKx86EbuMfMnqL6J8W3tPkocbF2mAa+Y2YFYBZoNqfWNqL481EREVlc2z8a\nEhGRpSkRiIhETolARCRySgQiIpFTIhARiZwSgchrYGb3mNmR2p9ZirQ0JQKR1+Y/gPeFDkLkXFAi\nEHkNams0/SV0HCLnghKBiEjklAhERCKnRCAiEjklAhGRyCkRiLwGZvYD4P+AN5vZ/toqtiItSauP\niohETiMCEZHIKRGIiEROiUBEJHJKBCIikVMiEBGJnBKBiEjklAhERCKnRCAiErn/B5GlqY72Icc/\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb2f7a20>"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF7pJREFUeJzt3XtsXGeZx/HvY4/vqd12nRu0SVrakgpEKupW+aMUAmwE\nBFr+QP1nVy0XKcCySLCsyqVdiUVF6lIE4q9lq6XapqLcBFkqZVs1ZRcKq3Vap2qgyIFeiNvcSF0S\nT5yxPT6eZ/+YmXSSjp20zTnvmXl/Hyny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PbD4EXaQfM7KPAB4G/afMLHmjaDu8ELgH21J4XXwQ8YWar\nggWZgUXOh/3Az7zqMaBCde2dtrVIO9wC/Kz2LT+pbWtbbZ8IzGzAzM6rv6ba63sKeIDqwab28edh\nIszGYu1gZu+j+lz8BncvhYwxC4u0w+PuvsLd17n7Oqo3w7e7++GAoaZqieviP4FNte1XAN20zwJs\nr7BEOxyk2kEAeDfwdJgIsxHDo6GVwHYzg+rve7+7P2Rmj1Md9n6C6sqmNwWMMQuLtcMzQA/VITHA\nqLt/KlyYqWvaDmFDCmKx86EbuMfMnqL6J8W3tPkocbF2mAa+Y2YFYBZoNqfWNqL481EREVlc2z8a\nEhGRpSkRiIhETolARCRySgQiIpFTIhARiZwSgchrYGb3mNmR2p9ZirQ0JQKR1+Y/gPeFDkLkXFAi\nEHkNams0/SV0HCLnghKBiEjklAhERCKnRCAiEjklAhGRyCkRiLwGZvYD4P+AN5vZ/toqtiItSauP\niohETiMCEZHIKRGIiEROiUBEJHJKBCIikVMiEBGJnBKBiEjklAhERCKnRCAiErn/B5GlqY72Icc/\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb2f7a20>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df2.plot(kind='scatter',x=1,y=0,alpha=0.5).get_figure()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n"
     ]
    }
   ],
   "source": [
    "print type(s1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF7pJREFUeJzt3XtsXGeZx/Hv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YCZrQB2mtnexi+6u5tZDL3AV7SDuz8K\nYGa3UX0W+v2gEWaj2fnwFWBz4Liy1qwdCsCFwEbgGqr1xS/19n6G3KwdPgJ83t1/amY3Ad8D3hs0\nyhRFMSJw9wO1j0eA7cC1wJ/NbDVA7WPbD4EXaQfM7KPAB4G/afMLHmjaDu8ELgH21J4XXwQ8YWar\nggWZgUXOh/3Az7zqMaBCde2dtrVIO9wC/Kz2LT+pbWtbbZ8IzGzAzM6rv6ba63sKeIDqwab28edh\nIszGYu1gZu+j+lz8BncvhYwxC4u0w+PuvsLd17n7Oqo3w7e7++GAoaZqieviP4FNte1XAN20zwJs\nr7BEOxyk2kEAeDfwdJgIsxHDo6GVwHYzg+rve7+7P2Rmj1Md9n6C6sqmNwWMMQuLtcMzQA/VITHA\nqLt/KlyYqWvaDmFDCmKx86EbuMfMnqL6J8W3tPkocbF2mAa+Y2YFYBZoNqfWNqL481EREVlc2z8a\nEhGRpSkRiIhETolARCRySgQiIpFTIhARiZwSgchrYGb3mNmR2p9ZirQ0JQKR1+Y/gPeFDkLkXFAi\nEHkNams0/SV0HCLnghKBiEjklAhERCKnRCAiEjklAhGRyCkRiLwGZvYD4P+AN5vZ/toqtiItSauP\niohETiMCEZHIKRGIiEROiUBEJHJKBCIikVMiEBGJnBKBiEjklAhERCKnRCAiErn/B5GlqY72Icc/\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbb64518>"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF7pJREFUeJzt3XtsXGeZx/HvY4/vqd12nRu0SVrakgpEKupW+aMUAmwE\nBFr+QP1nVy0XKcCySLCsyqVdiUVF6lIE4q9lq6XapqLcBFkqZVs1ZRcKq3Vap2qgyIFeiNv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8D3hs0\nyhRFMSJw9wO1j0eA7cC1wJ/NbDVA7WPbD4EXaQfM7KPAB4G/afMLHmjaDu8ELgH21J4XXwQ8YWar\nggWZgUXOh/3Az7zqMaBCde2dtrVIO9wC/Kz2LT+pbWtbbZ8IzGzAzM6rv6ba63sKeIDqwab28edh\nIszGYu1gZu+j+lz8BncvhYwxC4u0w+PuvsLd17n7Oqo3w7e7++GAoaZqieviP4FNte1XAN20zwJs\nr7BEOxyk2kEAeDfwdJgIsxHDo6GVwHYzg+rve7+7P2Rmj1Md9n6C6sqmNwWMMQuLtcMzQA/VITHA\nqLt/KlyYqWvaDmFDCmKx86EbuMfMnqL6J8W3tPkocbF2mAa+Y2YFYBZoNqfWNqL481EREVlc2z8a\nEhGRpSkRiIhETolARCRySgQiIpFTIhARiZwSgchrYGb3mNmR2p9ZirQ0JQKR1+Y/gPeFDkLkXFAi\nEHkNams0/SV0HCLnghKBiEjklAhERCKnRCAiEjklAhGRyCkRiLwGZvYD4P+AN5vZ/toqtiItSauP\niohETiMCEZHIKRGIiEROiUBEJHJKBCIikVMiEBGJnBKBiEjklAhERCKnRCAiErn/B5GlqY72Icc/\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbb64518>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "s1.plot(kind='scatter',x=1,y=0,alpha=0.5).get_figure()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
